﻿{% extends "./inc/inc_baseNew.html" %}
{% block content %}
<style>
div.shop-item {
    margin-bottom: 0;
}
.shop-item-diqu{
    text-align: left;
}
.ivu-tag-blue {
    line-height: 20px;
    background: #e6f7ff;
    border-color: #91d5ff;
}
.ivu-tag {
    display: inline-block;
    height: 22px;
    padding: 0 8px;
    border: 1px solid #1374d4;
    border-radius: 10px;
    background: #f7f7f7;
    font-size: 12px;
    vertical-align: middle;
    opacity: 1;
    overflow: hidden;
}
.ivu-tag-blue .ivu-tag-text {
    color: #1890ff!important;
}
.shop-item-order{
    display: flex;
    justify-content: space-between;
}
.panel-default {
    border-color: #ddd;
}
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
    box-shadow: 0 1px 1px rgba(0,0,0,.05);
    text-align: center;
}
.shop-item-image{
    padding: 10px 10px 0 10px;
}
div.shop-item-summary{
    padding-top:0;
}
div.shop-item-summary h2{
    font-size: 17px;
}
div.shop-item-price{
    font-size: 20px;
    font-weight: initial;
    margin: 6px;
}
div.shop-item-price span{
    color: #ed1a24!important;
    font-weight: lighter;
    padding:0 0 0 2px;
}
div.shop-item-shuliang {
    font-size: 15px;
    font-weight: lighter;
    border-top: 1px solid #9999991a;
}
@media (min-width: 992px){
    .col-lg-3 {
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    max-width: 25%;
}
.col-lg-10 {
    -ms-flex: 0 0 80%;
    flex: 0 0 80%;
    max-width: 80%;
}
.col-lg-2 {
    -ms-flex: 0 0 20%;
    flex: 0 0 20%;
    max-width: 20%;
}
}
.panel-tuijian{
    margin: 0;
    border: 1px solid #9999991a;
}
.guadan-title {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 25px;
    color: inherit;
    height: 60px;
    line-height: 60px;
    text-align: left;
}
.btn-primary {
    border-radius:0;
}
.btn-fabu{
    margin-top:20px;
    height: 70px;
    line-height: 70px;
}
.btn-shaixuan{
    margin-top:20px;
    height: 50px;
    line-height: 50px; 
    display:flex; 
    padding:0 20px;
    justify-content: space-between;
}
.filter-btn{
    margin-left: 50px;
}
table {
    background-color: #fff;
    font-family: "Segoe UI","Microsoft Yahei",arial,sans-serif;
    -webkit-font-smoothing: antialiased;
    /* font-size: 1rem; */
    line-height: 1.5;
    margin: 0;
    padding: 0;
    text-align:initial;
}
.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
    padding: 8px;
    line-height: 1.42857143;
    vertical-align: middle;
    border-top: 1px solid #ddd;
}
table .btn {
    margin: 0 3px;
}
.btn {
    position: relative;
}
.btn-sm, .btn-xs, .btn-lg, .btn-xlg {
    height: auto;
    font-size: inherit;
}
.relative {
    position: relative;
}
.btn-group-xs>.btn, .btn-xs {
    /* padding: 1px 5px; */
    line-height: 1.5;
    border-radius: 3px;
}
.btn-danger {
    color: #fff;
    background-color: #ed1a24;
    border-color: #d43f3a;
}
.container{
    font-size: 14px;
}
.city-picker-span{
    color: #495057;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    border-bottom:0;
    border-radius:3px;
    padding: 0 .5rem;
}
.city-picker-span > .placeholder{
    color: #495057;
}
.filter-option-inner-inner{
    color: #495057;
}
.city-picker-span > .title > span{
    color: #495057;
    padding:0;
}
.city-select-wrap .city-select a.active{
    color: #fff;
    background-color: #ed1a24;
}
.city-select-tab > a.active{
    color: #000;
}
.city-picker-span > .title > span:hover {
    color: #fff;
    background-color: #ed1a24;
}
.guadan-title ~ p,.xinxifabu > p{
    border-left: 5px solid #ed1a24;
    padding-left: 5px;
    height: 25px;
    line-height: 25px;
    background-color: #f4f4f4;
    margin: 5px 0;
}

.row > span:before {
    content: '*';
    font-weight: 700;
    color: #f00;
    margin-right: 5px;
}
.row > span.norequired:before {
    content:'';
}
.xinxifabu .row{
    margin-top: 10px;
    margin-bottom: 10px;
}
#uploader{
    margin-left: 15px;
}
.margin-left15{
    margin-left: 15px;
}
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu>.dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: -1px;
    -webkit-border-radius: 0 6px 6px 6px;
    -moz-border-radius: 0 6px 6px;
    border-radius: 0 6px 6px 6px;
}

.dropdown-submenu>a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu.pull-left {
    float: none;
}

.dropdown-submenu.pull-left>.dropdown-menu {
    left: -100%;
    margin-left: 10px;
    -webkit-border-radius: 6px 0 6px 6px;
    -moz-border-radius: 6px 0 6px 6px;
    border-radius: 6px 0 6px 6px;
}
.city-picker-dropdown{
    margin-left: 15px;
}
li.active,li:active,.dropdown-item.active,.dropdown-item:active,.dropdown-submenu.active,.dropdown-submenu:active,.dropdown-item:focus {
    color:#fff;
    background-color: #ed1a24;
}
.active >a{
    color:#fff;
}
.btn-fabu .btn{
    width:120px;
}
.filelist{
    display: flex;
    flex-wrap: wrap;
}
.filelist li{
    margin-right: 30px;
    margin-bottom: 30px;
    position: relative;

}
.modal-lg{
    max-width:1000px
}
.querenn .row > span:before {
    content: '';
    margin-right: 0;
}
</style>

<!-- /PAGE HEADER -->

        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-body">


<!-- -->
{% set title=order.yewuleixing|get_querentitle%}
<section>
    <div class="container querenn ">
        <div class="row">
            <div class="col xinxifabu">
                <p class="guadan-title" style="border: 0;padding: 0;margin-bottom: 10px; background-color: #fff;text-align: center;">订单详情</p>
                <div class="row">
                    <span class="col-3">
                        信息编号
                    </span>
                    <span class="col-3">
                        下单时间
                    </span>
                </div>
                <div class="row">
                    <div class="col-3">
                            <input type="text" name="order_no" value="{{order.order_no}}" class="form-control form-control-sm mb-2" readonly  required >
                    </div>
                    <div class="col-3">
                        <input type="text" name="chuangjianshijian" value="{{order.chuangjianshijian|moment('YYYY-MM-DD HH:mm:ss ')}}" class="form-control form-control-sm mb-2" readonly  required >    
                    </div>
                </div>
                <input type="hidden" name="yewuleixing" value="{{order.yewuleixing}}" readonly required>
                {%if order.gongxufabuid%}<input type="hidden" name="gongxufabuid" value="{{order.gongxufabuid}}" readonly>{%endif%}
                <p>{{title[0]}}</p>
                <div class="row">
                        <span class="col-6">
                            公司(商户)名称
                        </span>
                        <span class="col-2">
                            联系人
                        </span>
                        <span class="col-4">
                            联系电话
                        </span>
                </div>
                <input type="text" name="xuid" value="{{order.xuid}}"  required style="opacity: 0;position: absolute;" readonly required>
                <div class="row">
                    <div class="col-6">
                        <input type="text" name="xu_gsmc" value="{{order.xu_gsmc}}" class="form-control form-control-sm mb-2" readonly  required >
                    </div>   
                    <div class="col-2">
                        <input type="text" name="xu_username" value="{{order.xu_username}}" class="form-control form-control-sm mb-2" readonly  required >    
                    </div>
                    <div class="col-4">
                        <input type="text" name="xu_mobile" value="{{order.xu_mobile}}" class="form-control form-control-sm mb-2" readonly required >    
                    </div>                            
                </div>
                <p>{{title[1]}}</p>
                <div class="row">
                        <span class="col-6">
                            公司(商户)名称
                        </span>
                        <span class="col-2">
                            联系人
                        </span>
                        <span class="col-4">
                            联系电话
                        </span>
                </div>
                <input type="text" name="gongid" value="{{order.gongid}}"  required style="opacity: 0;position: absolute;" readonly required>
                <input type="text" name="mokuaibiaoshi" style="opacity: 0;position: absolute;" readonly value="{{order.mokuaibiaoshi}}">
                <div class="row">
                    <div class="col-6">
                        <input type="text" name="gong_gsmc" value="{{order.gong_gsmc}}" class="form-control form-control-sm mb-2" readonly  required >
                    </div>   
                    <div class="col-2">
                        <input type="text" name="gong_username" value="{{order.gong_username}}" class="form-control form-control-sm mb-2" readonly  required >    
                    </div>
                    <div class="col-4">
                        <input type="text" name="gong_mobile    " value="{{order.gong_mobile}}" class="form-control form-control-sm mb-2" readonly required >    
                    </div>                            
                </div>

                

                <p>订单信息</p>
                
                    <div class="row"> 
                            <span class="col-4">信息标题</span>
                            <span class="col-2">所在地区</span>
                            <span class="col-4">详细位置</span>
                            <span class="col-2">订单类型</span>
                    </div>
                    <div class="row">              
                            <div class="col-4 ">
                                <input type="text" name="xinxibiaoti" value="{{order.xinxibiaoti}}" class="form-control form-control-sm mb-2"  readonly  required>
                            </div>
                            <div class="btn-group btn-xs col-2 " style="position:relative;">
                                <input type="text" name="diqu"  value="{{order.diqu}}" class="form-control form-control-sm mb-2" readonly  required>
                            </div>
                            <div class="col-4">
                                <input type="text" name="suozaiweizhi" value="{{order.suozaiweizhi}}" class="form-control form-control-sm mb-2"  placeholder="请输入" readonly required>
                            </div>
                            <div class="col-2">
                                <input type="text" value="{{order.yewuleixing|get_gongxutype}}" class="form-control form-control-sm mb-2"  placeholder="请输入" readonly disabled>
                            </div>                                   
                    </div>
                    <div class="row"> 
                            <span class="col-2">商品类别</span>
                            <span class="col-2">商品价格(元/吨)</span>
                            <span class="col-2">预计数量(吨)</span>
                            <span class="col-2">预计货款(元)</span>
                            {% if order.taxes %}<span class="col-2">发票税率(%)</span>{%endif%}
                            {% if order.persent %}<span class="col-2">付款比例(%)</span>{%endif%}
                    </div>
                    <div  class="row">
                            <div class="col-2">
                                <input type="text" name="shangpingleibie" value="{{order.shangpingleibie}}"  class="form-control form-control-sm mb-2" readonly required>
                            </div>  
                            <div class="col-2">
                                <input type="text" onKeyUp="this.value=this.value.replace(/(^0+)|[^\.\d]/g,'');this.value=this.value.replace('.','');" name="jiage" value="{{order.jiage}}" class="form-control form-control-sm mb-2"  placeholder="请输入"  maxlength="5" required readonly>
                            </div> 
                            <div class="col-2 ">
                                <input type="text" onKeyUp="this.value=this.value.replace(/(^0+)|[^\.\d]/g,'');this.value=this.value.replace('.','');" name="shangpingshuliang" value="{{order.shangpingshuliang}}" class="form-control form-control-sm mb-2"  placeholder="请输入"  maxlength="5" required readonly>
                            </div>
                            <div class="col-2 ">
                                <input type="number" name="zongjia" value="{{order.zongjia}}" class="form-control form-control-sm mb-2"  placeholder="请输入" required readonly>
                            </div>
                            {% if order.taxes %}
                            <div class="col-2 ">
                                <input type="text" name="taxes" value="{{order.taxes|get_taxes}}"class="form-control form-control-sm mb-2"  placeholder="请输入" maxlength="2" required readonly>
                            </div>
                            {%endif%}         
                            {% if order.persent %}
                            <div class="col-2">
                                <input type="text"  onKeyUp="this.value=this.value.replace(/(^0+)|[^\.\d]/g,'');this.value=this.value.replace('.','');"  name="persent" value="{{order.persent}}"class="form-control form-control-sm mb-2"  placeholder="请输入" maxlength="2" required readonly>
                            </div>   
                            {%endif%}                         
                    </div>
                    <div class="row">
                        <span class="col norequired">商品描述</span>
                    </div>
                    <div class="row">
                        <div class="col-12">
                            <textarea class="col" name="leirongmiaoshu" value="{{order.leirongmiaoshu}}" maxlength="60" style="padding: 5px; border: 1px solid #ced4da;border-radius: .2rem;min-height: 50px" placeholder="例如质量标准、含杂要求、质检扣罚等要求（限60字）" readonly>{{order.leirongmiaoshu}}</textarea>
                        </div>
                    </div>
                    <p>图片信息</p>
                    <div class="row">
                        {% set tupian = order.tupian|strToJson%}
                        <input type="hidden" name="tupian" class="form-control" id="tupian" value="{{order.tupian}}">
                        <ul id="uploader" class="filelist">
                            {% for item in tupian%}
                            <a  href="{{item}}" data-toggle="lightbox">
                                <li class="state-complete">
                                        <p class="imgWrap">
                                        <img  style="width:100px;height:100px;" src="{{item}}">
                                        </p>
                                </li>
                            </a>
                            {%endfor%}
                        </ul>
                    </div>
                    <div class="panel panel-default btn-fabu row action_link justify-content-center">
                        <!-- <button class="btn btn-primary btn-s-md ajax-post" type="submit" target-form="form-queren">确认下单</button>
                        <button type="button" class="btn  btn-light btn-s-md" data-dismiss="modal">取消</button> -->
              
                        {% if (order.gongqueren==0 and order.xuqueren==1) or (order.gongqueren==1 and order.xuqueren==0) %}

                            {%if controller.is_login != order.order_userid%}
                            <form method="post" class="form-queren col-2" action="/center/order/queren" data-validate="parsley">
                                <input type="hidden" name="id"  readonly required value="{{order.id}}">
                                <button class="btn btn-primary btn-lg ajax-post confirm"  message="请确认接受订单" type="submit" target-form="form-queren" >接受</button>
                            </form>
                            <form method="post"  class="form-quxiao col-2" action="/center/order/quxiao" data-validate="parsley">
                                <input type="hidden" name="id" readonly required value="{{order.id}}">
                                <button class="btn btn-primary btn-lg ajax-post confirm" message="请确认拒绝订单" type="submit" target-form="form-quxiao" >拒绝</button>
                            </form>
                            {%else%}
                            <form method="post"  class="form-quxiao col-2" action="/center/order/quxiao" data-validate="parsley">
                                <input type="hidden" name="id" readonly required value="{{order.id}}">
                                <button class="btn btn-primary btn-lg ajax-post confirm" message="请确认撤销订单" type="submit" target-form="form-quxiao" >撤销</button>
                            </form>
                            {%endif%}

                        {% endif%}

                        {% if order.status == 3 and controller.is_login == order.xuid and controller.user.groupid == 12 %}
                        <div class="col-2">
                            <a  href="/center/pay/index?id={{order.id}}" class="btn btn-primary btn-lg" data-toggle="ajaxModal" >点击付款</a>
                        </div>
                        {% endif%}
                        {% if order.status == 4 %}
                        <div class="col-2">
                            <button class="btn btn-danger btn-lg" >订单已作废</button>
                        </div>
                        {% endif%}
            </div>

            </div>
        </div>
    </div>
</section>
<!-- / -->
</div>
</div>
</div>
{% endblock %}